package com.ac.api.user.vo;

import com.base.context.IUser;
import com.ac.api.user.entity.AcUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;

/**
 * @Author mzl.
 */
@Data
@ApiModel(value = "用户")
public class AcUserVo extends AcUser implements IUser {

    @ApiModelProperty(value = "所属角色组Id")
    private String grouptype;

    @ApiModelProperty(value = "操作人角色Id")
    private String usergroup;

    @ApiModelProperty("角色名称")
    private String acgroupName;

    @ApiModelProperty("用户类型名称")
    private String usertypeName;

    @ApiModelProperty("部门名称")
    private String organizationName;

    //用户信息表
    @ApiModelProperty(value = "ac_user用户表id")
    private Integer userid;

    @ApiModelProperty(value = "级别")
    private Integer level;

    @ApiModelProperty(value = "第三方id")
    private String third_id;

    @ApiModelProperty(value = "性别,男：1 女：0")
    private Integer gender;

    @ApiModelProperty(value = "身份证")
    private String idcard;

    @ApiModelProperty(value = "注册时间")
    private LocalDateTime registerTime;

    @ApiModelProperty(value = "最后登录时间")
    private LocalDateTime loginTime;
    public AcUserVo() {
    }

    public AcUserVo(AcUser acUser, String grouptype, String usergroup) {
        BeanUtils.copyProperties(acUser, this);
        this.grouptype = grouptype;
        this.usergroup = usergroup;
    }

}
